package com.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.project.bean.UserResultBean;
import com.project.mapper.IUserResultMapper;
import com.project.service.IUserResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class UserResultServiceImpl implements IUserResultService {
      @Autowired
      private IUserResultMapper userResultMapper;
      
      @Override
      public List<UserResultBean> findByUserNum(Long userNum) {
            QueryWrapper<UserResultBean> qw=new QueryWrapper<>();
            qw.eq("userNum",userNum);
            return userResultMapper.selectList(qw);
      }
      
      @Override
      public void add(UserResultBean userResultBean) {
            userResultMapper.insert(userResultBean);
      }
}
